<template>
  <div>
    <p id="top">
      <span @click="prev()">&lt;</span>
      新用户注册
    </p>
    <hr />
    <div class="bottom">
      <div class="big" id="phone">
        <input type="text" placeholder="请输入手机号" v-model="username" />
        <button class="yz">获取验证码</button>
      </div>
      <div class="big">
        <input type="text" placeholder="请输入验证码" />
      </div>
      <div class="big">
        <input type="text" placeholder="密码不能少于六位" />
      </div>
      <button id="zhuce" @click="fun()">注册</button>
    </div>
  </div>
</template>

<script>
import { postlink } from "a/postlink.js";
export default {
  data() {
    return {
      username: "",
    };
  },

  methods: {
    prev() {
      this.$router.go("-1");
    },
 fun(){
      let usp=new URLSearchParams
      // usp.append("key","val")
      usp.append("userid",this.username)


      postlink("http://180.76.121.47:8008/docs#/default/user_regist_regist_post",usp).then((ok)=>{
        console.log(ok)
      })
    }
  },
};
</script>

<style scoped>
div {
  font-size: 0.3rem;
  box-sizing: border-box;
  margin-top: 0.1rem;
}
#top {
  height: 0.3rem;
  line-height: 0.1rem;
  box-sizing: border-box;
}
.big {
  width: 100%;
  display: flex;
  justify-content: space-between;
  background-color: gainsboro;
}
input {
  border-style: none;
  width: 100%;
  height: 0.7rem;
  border-radius: 0.3rem;
  background-color: gainsboro;
}
.yz {
  line-height: 0.5rem;
  height: 0.5rem;
  font-size: 0.1rem;
}
.bottom {
  margin-top: 0.2rem;
}
#phone input {
  width: 75%;
  height: 0.7rem;
}
#zhuce {
  display: block;
  margin: auto;
  margin-top: 2rem;
  background-color: orange;
  border-radius: 0.1rem;
  width: 80%;
  height: 0.5rem;
}
</style>
